#include "historymusicwidget.h"

HistoryMusicWidget::HistoryMusicWidget(QWidget*parent):LocalMusicWidget(parent)
{
    localname->setText("历史播放");
    localfilebtn->hide();
    songitemfirst->SetDurationText("时间");
}

void HistoryMusicWidget::addNewRecord(const QUrl&url)
{
    QJsonObject obj;
    QVector<SongItem*>songitems;
    auto ptr=SongItem::FromUrl(url);
    ptr->SetTime(QTime::currentTime());
    ptr->SetLikeMode(false);
    songitems.push_back(ptr);
    AddSongItem(songitems);
}
